package com.yonyou.pmclouds.plan.processor;

import com.yonyou.pmclouds.basecom.bp.processor.SingleProcessor;
import com.yonyou.pmclouds.basecom.exception.BusinessException;
import com.yonyou.pmclouds.plan.entity.ProjectPlanVO;

public class PlanUpdatePermCheck implements SingleProcessor<ProjectPlanVO> {
    @Override
    public void process(ProjectPlanVO vo, ProjectPlanVO orig) throws BusinessException {
        String creator = orig.getCreator();
        if (vo.getModifier() == null || !vo.getModifier().equals(creator)) {
            throw new BusinessException("非创建人，不可编辑该计划！");
        }
    }
}
